package homework_02;
/**
 * 课后作业
 */

import java.util.Scanner;

public class kehou {
    public static void main(String[] args) {
        int a,b,c;
        a=10;
        b=20;
        c=a;
        a=b;
        b=c;
        System.out.println("a="+a+"b="+b);

        Scanner x=new Scanner(System.in);
        System.out.println("请输入0-1000的数");
        int num = x.nextInt();
        int q=num/100;
        int w=num%100/10;
        int e=num%100%10;
        int sum = q+w+e;
        System.out.println("各位的和为"+sum);

        Scanner y=new Scanner(System.in);
        Scanner z=new Scanner(System.in);
        System.out.println("请输入已知的度数类型，摄氏度输入1，华氏度输入2");
        System.out.println("请输入已知的度数");
        int r=y.nextInt();
        int t=y.nextInt();
        double u;
        if (r==1){
           u = t*9/5+32;
            System.out.println("转换华氏度为"+u);
        }else{
            u = (t-32)*5/9;
            System.out.println("转化摄氏度为"+u);
        }

        char l='A';
        int m=(char)l+32;
        System.out.println(m);

    }
}
